package com.ruoyi.pac4j;

import com.ruoyi.system.pac4j.Pac4jService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.DependsOn;
import org.springframework.stereotype.Component;

@Component
@DependsOn({"pac4jSqlInitializingBean"})
public class Pac4jConfigInitializingBean implements InitializingBean {

    private static final Logger log = LoggerFactory.getLogger(Pac4jConfigInitializingBean.class);


    @Autowired
    private Pac4jService pac4jService;

    @Override
    public void afterPropertiesSet() {
        log.info("加载config");
        pac4jService.init();
    }
}
